<div class="container" @myInsertRemoveTrigger *ngIf="change" [hidden]="!hide" draggable="true">
  <div class="top">
    <div><label>任务管理</label></div>
    <span class="spanOne" (click)="close()"><i class="iconfont icon-guanbi"></i></span>
    <span class="spanThree" (click)="toSmall($event)"><i class="iconfont icon-suoxiao"></i></span>
  </div>
  <div class="bottom">
    <div class="left">
      <ul>
        <li *ngFor="let item of taskList;let i=index">
          <div (click)="open(item,i)">
            <div class="left-top">
              <span class="task-title">{{ item.title }}</span>
              <span class="task-state">{{
                    item.state == 0
                      ? "待审批"
                      : item.state == 1
                      ? "未通过"
                      : item.state == 2
                      ? "待完成"
                      : "已完成"
                  }}</span>
            </div>
            <div class="left-bottom">
              <span class="task-member">{{ item.publisher.name }}->{{ item.submitter.name }}</span>
              <span class="task-time">{{ item.issued | date: "yyyy-MM-dd" }}({{ item.nowDay }})</span>
            </div>
          </div>
        </li>
      </ul>
    </div>
    <div class="middle">
      <div class="middle-operation">
        <button class="btn-success" (click)="finish()">完成任务</button>
      </div>
      <div class="task-content">
        <div>
          <span class="task-content-title">任务名称：</span>
          <span class="task-content-text">{{ taskDetail.title }}</span>
        </div>
        <div class="executor">
          <span class="task-content-title">执行人：</span>
          <span class="task-content-text">{{ taskDetail.submitter.name }}</span>
        </div>
        <div class="originator">
          <span class="task-content-title">发起人：</span>
          <span class="task-content-text">{{ taskDetail.publisher.name }}</span>
        </div>
        <div class="start-time">
          <span class="task-content-title">开始时间：</span>
          <span class="task-content-text">{{
            taskDetail.issued | date: "yyyy-MM-dd"
          }}</span>
        </div>
        <div class="end-time">
          <span class="task-content-title">任务类型：</span>
          <span class="task-content-text">{{
            taskDetail.categories.name
          }}</span>
        </div>
        <div class="last-day">
          <span class="task-content-title">剩余天数：</span>
          <span class="task-content-text">{{ taskDetail.nowDay }}</span>
        </div>
        <div class="priority">
          <span class="task-content-title">任务优先级：</span>
          <span class="task-content-text">{{
            taskDetail.categories.weight == 1
              ? "低"
              : taskDetail.categories.weight == 2
              ? "中"
              : "高"
          }}</span>
        </div>
        <div class="state">
          <span class="task-content-title">任务状态：</span>
          <span class="task-content-text task-states">{{
            taskDetail.state == 0
              ? "待审批"
              : taskDetail.state == 1
              ? "未通过"
              : taskDetail.state == 2
              ? "待完成"
              : "已完成"
          }}</span>
        </div>
        <div class="task-content-describe">
          <span class="task-content-title">任务描述：</span>
          <span class="task-content-text">{{ taskDetail.content }}</span>
        </div>
      </div>
    </div>
  </div>
</div>